/*
Created By VietRise on 9/6/2014
*/

#include "Hole.h"

Hole::~Hole()
{
}

Hole::Hole()
{
	this->_state = STATEHOLE::sBlank;
	this->initWithSpriteFrameName("obj_hole.png");
}

Hole* Hole::create()
{
	Hole* sprite = new Hole();
	if (sprite)
	{
		sprite->autorelease();
		return sprite;
	}

	CC_SAFE_DELETE(sprite);	
	return NULL;
}

void Hole::setBlank()
{
	CCFiniteTimeAction* sequence = CCSequence::create(
		CCDelayTime::create(0.15f),
		CCCallFunc::create(this, callfunc_selector(Hole::animationBlankDone)),
		NULL);

	this->runAction(sequence);
}

void Hole::animationBlankDone()
{
	this->_state = STATEHOLE::sBlank;
}